package binh;

public class CCommon
{

    public static final int MAX_TIME_RESULT = 9;
    public static final int MAX_TIME_CHANGE_KEY = 10;
    public static final int ERROR_NOT_ENOUGH_CHICKEN_MONEY = 10;
    public static final int ERROR_NOT_ENOUGH_BET_MONEY = 3;
    public static final int ERROR_TABLE_HAS_CLIENT = 2;
    public static final int ERROR_TABLE_IS_FULL = 1;
    public static final int ERROR_USER_NOT_ONLINE = 4;
    public static final int ERROR_CALL_FAIL = 5;
    public static final int ITEM_XU = 1;
    public static final int ITEM_GOLD = 2;
    public static final int ITEM_AVATAR = 3;
    public static final int ITEM_FULL_AVATAR = 4;
    public static final int ITEM_EMOTION = 5;
    public static final int CURRENCY_GOLD = 0;
    public static final int CURRENCY_XU = 1;
    public static final int CURRENCY_GOLD_XU = 2;
    public static final String EVENT_CONNECT = "EVENT_CONNECT";
    public static final String EVENT_LOGIN = "EVENT_LOGIN";
    public static final String EVENT_REGISTER = "EVENT_REGISTER";
    public static final String EVENT_DISCONNECT = "EVENT_DISCONNECT";
    public static final String EVENT_BUY_AVATAR = "EVENT_BUY_AVATAR";
    public static final String EVENT_GAME_RESULT = "EVENT_GAME_RESULT";
    public static final String EVENT_GAME = "EVENT_GAME";
    public static final String EVENT_DAILY_BONUS = "EVENT_DAILY_BONUS";
    public static final String EVENT_TIME_BONUS = "EVENT_TIME_BONUS";
    public static final int TM_PUT_CARD = 1;
    public static final int TM_EAT_CARD = 2;
    public static final int TM_PICK_CARD = 3;
    public static final int TM_DOWN_GROUP = 4;
    public static final int TM_DOWN_END = 5;
    public static final int TALA_TURN_TIME = 30;
    public static final int MAX_SUIT = 30;
    public static final int MAX_SUIT_CARD = 20;
    public static final int TLMN_TURN_TIME = 30;
    public static final int TLMN_RAC = 1;
    public static final int TLMN_DOI = 2;
    public static final int TLMN_BA = 3;
    public static final int TLMN_SANH = 4;
    public static final int TLMN_DOI_THONG = 5;
    public static final int TLMN_TU_QUY = 6;
    public static final int TLMN_WIN_0 = 0;
    public static final int TLMN_WIN_1 = 1;
    public static final int BINH_THUNG_PHA_SANH = 10;
    public static final int BINH_TU_QUY = 9;
    public static final int BINH_CU_LU = 8;
    public static final int BINH_THUNG = 7;
    public static final int BINH_SANH = 6;
    public static final int BINH_SAM_CO = 5;
    public static final int BINH_THU = 4;
    public static final int BINH_DON = 3;
    public static final int BINH_MAU_THAU = 2;
    public static final int BINH_SPECIAL_NONE = -1;
    public static final int BINH_SPECIAL_3_THUNG = 0;
    public static final int BINH_SPECIAL_3_SANH = 1;
    public static final int BINH_SPECIAL_6_DOI = 2;
    public static final int BINH_SPECIAL_SANH_RONG = 3;
    public static final int BINH_SPECIAL_12_COLOR = 4;
    public static final int BINH_SPECIAL_13_COLOR = 5;
    // Common Define
    public static final int MAX_CARD_VALUE = 13;
    public static final int MAX_BUFFER_LENGTH = 1024;
    public static final int MAX_USER_LIST = 8;
    public static final int MAX_VKIM_BET_RATE = 5;
    public static final int NUM_GOLD_BET = 3;
    public static final int MAX_SERVERNAME_LENGTH = 30;
    public static final int MAX_CARD_LENGTH = 30;
    public static final int MAX_USERNAME_LENGTH = 30;
    public static final int MAX_PASSWORD_LENGTH = 50;
    public static final int MAX_SESSION_LENGTH = 80;
    public static final int MAX_VERSION_LENGTH = 10;
    public static final int MAX_MOBILE_NUMBER_LENGTH = 20;
    public static final int MAX_ADDRESS_LENGTH = 50;
    public static final int MAX_ITEM_NAME_LENGTH = 10;
    public static final int MAX_CMND_LENGTH = 15;
    public static final int MAX_STATUS_LENGTH = 50;
    public static final int MAX_MAIL_LENGTH = 200;
    public static final int MAX_URL_LENGTH = 100;
    public static final int MAX_TERMINATE_PASSWORD_LENGTH = 30;
    public static final int MAX_GAMENAME_LENGTH = 100;
    public static final int MAX_GAME_PASSWORD_LENGTH = 50;
    public static final int MAX_CHAT_MESSAGE_LENGTH = 100;
    public static final int MAX_MESSAGE_LENGTH = 500;
    public static final int MAX_REASON_LENGTH = 100;
    public static final int AVATAR_MAX_SIZE_X = 80;
    public static final int AVATAR_MAX_SIZE_Y = 100;
    public static final int MAX_FRIEND_LIST = 10;
    public static final int MAX_MAIL_LIST = 10;
    public static final int MAX_TITLE_LENGTH = 30;
    // Team No
    public static final int TN_NONE = 0;
    public static final int TN_PLAY = 1;
    public static final int TN_OBSERVER = 2;
    // Game Stage
    public static final int GS_WAITING_ROOM = 0;
    public static final int GS_SELECT_BANKER = 1;
    public static final int GS_DIVIDE_CARD = 2;
    public static final int GS_OPEN_CARD = 3;
    public static final int GS_PLAYING = 4;
    public static final int GS_RESULT = 5;
    public static final int GS_CALL = 6;
    public static final int GS_CALL_2 = 7;
    // App
    public static final int APP_BACAY = 1;
    public static final int APP_TALA = 2;
    public static final int APP_TLMN = 3;
    public static final int APP_TLMB = 4;
    public static final int APP_BINH = 5;
    public static final int APP_BAITAY = 6;
    public static final int APP_CARO = 7;
    public static final int APP_XITO = 8;
    public static final int APP_BIA = 9;
    // Client Stage
    public static final int CS_BEFORE_LOGIN = 0;
    public static final int CS_LOBBY = 1;
    public static final int CS_IN_GAME = 2;
    // Client Result (Phom)
    public static final int CR_NONE = 0;
    public static final int CR_U = 1;
    public static final int CR_MOM = 2;
    public static final int CR_SCORE = 3;
    public static final int CR_U_DEN = 4;
    public static final int CR_SCORE_1 = 5;
    public static final int CR_SCORE_2 = 6;
    public static final int CR_SCORE_3 = 7;
    public static final int CR_SCORE_4 = 8;
    public static final int MAX_LEVEL = 100;
    public static final double[] AVATAR_COST =
    {
        0, 50000, 50000, 50000,
        50000, 50000, 50000, 50000,
        50000, 50000, 50000
    };
    public static final int[] AVATAR_LEVEL =
    {
        0, 2, 4, 4, 5, 5, 6, 7, 8, 10, 10
    };
    public static final int[] LEVEL_EXP =
    {
        10,
        80,
        200,
        400,
        600,
        820,
        1060,
        1320,
        1600,
        1920,
        2280,
        2680,
        3120,
        3600,
        4140,
        4740,
        5400,
        6120,
        6900,
        7760,
        8700,
        9720,
        10820,
        12000,
        13280,
        14660,
        16140,
        17720,
        19400,
        21200,
        23040,
        24920,
        26840,
        28800,
        30900,
        33140,
        35520,
        38040,
        40700,
        43520,
        46500,
        49640,
        52940,
        56400,
        60060,
        63920,
        67980,
        72240,
        76700,
        84000,
        92000,
        100000,
        110000,
        121000,
        133000,
        146000,
        160000,
        175000,
        191000,
        209000,
        229000,
        251000,
        275000,
        301000,
        331000,
        363500,
        401000,
        441000,
        486000,
        541000,
        598500,
        658500,
        721000,
        786000,
        856000,
        931000,
        1011000,
        1096000,
        1186000,
        1286000,
        1396000,
        1516000,
        1646000,
        1786000,
        1941000,
        2111000,
        2311000,
        2561000,
        2861000,
        3261000,
        3711000,
        4211000,
        4861000,
        5561000,
        6361000,
        7361000,
        8461000,
        9711000,
        11211000,
        13211000,
    };
    // Client-Server Packet
    public static final int MT_LOBBY_CHAT = 1;
    public static final int MT_GAME_CHAT = 2;
    public static final int MT_START_GAME = 4;
    public static final int MT_CHANGE_RULE = 7;
    public static final int MT_NEW_MONEY = 8;
    public static final int MT_BUY_CARD = 27;
    public static final int MT_LOGIN_RESULT = 50;
    public static final int MT_LOBBY_GAME_JOIN = 51;
    public static final int MT_LOBBY_GAME_LEFT = 52;
    public static final int MT_LOBBY_CLIENT_JOIN = 53;
    public static final int MT_LOBBY_CLIENT_LEFT = 54;
    public static final int MT_CREATE_GAME_RESULT = 55;
    public static final int MT_JOIN_GAME_RESULT = 56;
    public static final int MT_GAME_CLIENT_JOIN = 57;
    public static final int MT_GAME_CLIENT_LEFT = 58;
    public static final int MT_INVITE = 61;
    public static final int MT_SUB_CHANNEL_INFO = 62;
    public static final int MT_SET_HOST = 64;
    public static final int MT_SET_GAME_STAGE = 65;
    public static final int MT_USER_DETAIL_INFO = 77;
    public static final int MT_LOBBY_INFO = 10;
    public static final int MT_NOTIFY_ERROR = 240;
    public static final int MT_VIEWER_DATA = 242;
    public static final int MT_NOTIFY_ADD_FRIEND = 243;
    public static final int MT_BAITAY_REQUEST_OPEN_CARD = 9;
    public static final int MT_BAITAY_SET_CARD = 11;
    public static final int MT_BAITAY_OPEN_CARD = 12;
    public static final int MT_BAITAY_GAME_RESULT = 13;
    public static final int MT_BAITAY_SET_TURN = 3;
    public static final int MT_BAITAY_CALL_BET = 5;
    public static final int MT_BAITAY_CLOSE_CARD = 6;
    public static final int MT_BAITAY_FOLLOW = 15;
    // Client-Side Packet
    public static final int MT_LOGIN = 100;
    public static final int MT_CREATE_GAME = 102;
    public static final int MT_QUIT_GAME = 103;
    public static final int MT_JOIN_GAME = 104;
    public static final int MT_KICK = 105;
    public static final int MT_REQUEST_LOBBY_INFO = 106;
    public static final int MT_REQUEST_INVITE = 107;
    public static final int MT_REQUEST_SUB_CHANNEL_INFO = 108;
    public static final int MT_REQUEST_USER_DETAIL_INFO = 117;
    public static final int MT_REQUEST_REGISTER = 150;
    public static final int MT_REGISTER_RESULT = 151;
    public static final int MT_REQUEST_USER_BASIC_INFO = 152;
    public static final int MT_USER_BASIC_INFO = 153;
    public static final int MT_UPDATE_USER_BASIC_INFO = 154;
    public static final int MT_REQUEST_BUY_AVATAR = 155;
    public static final int MT_SEND_AVATAR = 80;
    public static final int MT_BUY_AVATAR_RESULT = 156;
    public static final int MT_REQUEST_USER_LIST = 157;
    public static final int MT_NOTIFY_POPUP = 158;
    public static final int MT_NOTIFY_TITLE = 149;
    public static final int MT_REQUEST_SEND_MAIL = 159;
    public static final int MT_SEND_MAIL_RESULT = 160;
    public static final int MT_REQUEST_MAIL_LIST = 161;
    public static final int MT_LOCK_TABLE = 162;
    public static final int MT_MAIL_LIST = 118;
    public static final int MT_REQUEST_MAIL_CONTENT = 163;
    public static final int MT_MAIL_CONTENT = 164;
    public static final int MT_REQUEST_DELETE_MAIL = 165;
    public static final int MT_REQUEST_ADD_FRIEND = 166;
    public static final int MT_ADD_FRIEND_RESULT = 167;
    public static final int MT_USER_LIST = 119;
    public static final int MT_USER_LIST_END = 120;
    public static final int MT_REQUEST_GIFT_DAILY_INFO = 220;
    public static final int MT_REQUEST_GIFT_TIME_INFO = 221;
    public static final int MT_GIFT_DAILY_INFO = 222;
    public static final int MT_GIFT_TIME_INFO = 227;
    public static final int MT_REQUEST_RECEIVE_GIFT_DAILY = 223;
    public static final int MT_RECEIVE_GIFT_DAILY_RESULT = 224;
    public static final int MT_REQUEST_RECEIVE_GIFT_TIME = 225;
    public static final int MT_RECEIVE_GIFT_TIME_RESULT = 226;
    public static final int MT_REQUEST_AUTO_JOIN_GAME = 241;
    public static final int MT_REQUEST_REMOVE_LAZY = 14;
    public static final int MT_REQUEST_EXCHANGE_MONEY = 235;
    public static final int MT_EXCHANGE_MONEY = 236;
    public static final int MT_LUCKY_NUMBER = 237;
    public static final int MT_SELL_ITEM = 238;
    public static final int MT_MARKET_ITEM_LIST = 239;
    public static final int MT_BUY_ITEM = 244;
    public static final int MT_USER_INFO = 245;
    public static final int MT_SHOP_ITEM_LIST = 246;
    public static final int MT_ASSET_LIST = 247;
    public static final int MT_UPDATE_MONEY = 248;
    public static final int MT_ACCEPT_ADD_FRIEND = 249;
    public static final int MT_CHANGE_AVATAR = 250;
    public static final int MT_REMOVE_ASSET = 251;
    public static final int MT_MY_MARKET_ITEM = 252;
    public static final int MT_CANCEL_SELL_ITEM = 253;
    // Ba cay
    public static final int MT_BACAY_SET_CARD = 66;
    public static final int MT_BACAY_GAME_RESULT = 67;
    public static final int MT_BACAY_OPEN_CARD = 68;
    public static final int MT_BACAY_SET_BANKER = 72;
    public static final int MT_BACAY_BET_VKIM = 73;
    public static final int MT_BACAY_BET_FRONTIER_RESULT = 75;
    public static final int MT_BACAY_BET_CONTRIBUTE_RESULT = 76;
    public static final int MT_BACAY_SELECT_BANKER_CARD = 78;
    public static final int MT_BACAY_REQUEST_BET_VKIM = 112;
    public static final int MT_BACAY_REQUEST_BET_FRONTIER = 113;
    public static final int MT_BACAY_ACCEPT_BET_FRONTIER = 114;
    public static final int MT_BACAY_REQUEST_BET_CONTRIBUTE = 115;
    public static final int MT_BACAY_ACCEPT_BET_CONTRIBUTE = 116;
    public static final int MT_BACAY_REQUEST_OPEN_CARD = 109;
    // TaLa Packet
    public static final int MT_TALA_CLIENT_RESULT = 180;
    public static final int MT_TALA_GAME_RESULT = 181;
    public static final int MT_TALA_GAME_STATE = 182;
    public static final int MT_TALA_ARRANGE_SLOT = 183;
    public static final int MT_TALA_SET_CARD = 184;
    public static final int MT_TALA_SET_TURN = 185;
    public static final int MT_TALA_GROUP_CARD = 186;
    public static final int MT_TALA_REQUEST_PUT_CARD = 187;
    public static final int MT_TALA_PUT_CARD = 188;
    public static final int MT_TALA_REQUEST_PICK_CARD = 189;
    public static final int MT_TALA_PICK_CARD = 190;
    public static final int MT_TALA_REQUEST_EAT_CARD = 191;
    public static final int MT_TALA_EAT_CARD = 192;
    public static final int MT_TALA_EAT_CHICKEN = 193;
    public static final int MT_TALA_MOVE_CARD_DOWN = 194;
    public static final int MT_TALA_REQUEST_DOWN_GROUP = 195;
    public static final int MT_TALA_DOWN_GROUP = 196;
    public static final int MT_TALA_DOWN_GROUP_END = 197;
    public static final int MT_TALA_OPEN_CARD = 198;
    public static final int MT_TALA_REQUEST_CONTRIBUTE_CARD = 199;
    public static final int MT_TALA_CONTRIBUTE_CARD = 200;
    // TLMN
    public static final int MT_TLMN_SET_TURN = 201;
    public static final int MT_TLMN_SET_CARD = 202;
    public static final int MT_TLMN_REQUEST_PUT_CARD = 203;
    public static final int MT_TLMN_PUT_CARD = 204;
    public static final int MT_TLMN_REQUEST_LEFT_TURN = 205;
    public static final int MT_TLMN_LEFT_TURN = 206;
    public static final int MT_TLMN_CLIENT_RESULT = 207;
    public static final int MT_TLMN_GAME_RESULT = 208;
    // Mau Binh
    public static final int MT_BINH_SET_CARD = 209;
    public static final int MT_BINH_DOWN_CARD = 210;
    public static final int MT_BINH_CANCEL_DOWN_CARD = 211;
    public static final int MT_BINH_OPEN_CARD = 212;
    public static final int MT_BINH_GAME_RESULT = 213;
    public static final int MT_SET_CHICKEN = 214;
    public static final int MT_BINH_NOTIFY_DOWN_CARD = 215;
    public static final int MT_BROADCAST = 230;
    public static final int MT_HEART_BEAT = 231;
    public static final int MT_REQUEST_PAYMENT = 228;
    public static final int MT_PAYMENT_RESULT = 229;
    public static final int MT_REQUEST_CHANGE_PASS = 233;
    public static final int MT_CHANGE_PASS_RESULT = 232;
    public static final int MT_PUBLIC_TEXT = 234;
    public static final int MT_EMOTION_LIST = 254;

    public static String GetPacketName(int PacketId)
    {
        int Id = PacketId;
        if (Id < 0)
        {
            Id += 256;
        }

        switch (Id)
        {
            // Client-Server Packet
            case MT_LOBBY_CHAT:
                return "MT_LOBBY_CHAT";
            case MT_GAME_CHAT:
                return "MT_GAME_CHAT";
            case MT_START_GAME:
                return "MT_START_GAME";
            case MT_CHANGE_RULE:
                return "MT_CHANGE_RULE";
            case MT_NEW_MONEY:
                return "MT_NEW_MONEY";
            case MT_HEART_BEAT:
                return "MT_HEART_BEAT";


            // Server-Side Packet
            case MT_LOGIN_RESULT:
                return "MT_LOGIN_RESULT";
            case MT_LOBBY_GAME_JOIN:
                return "MT_LOBBY_GAME_JOIN";
            case MT_LOBBY_GAME_LEFT:
                return "MT_LOBBY_GAME_LEFT";
            case MT_LOBBY_CLIENT_JOIN:
                return "MT_LOBBY_CLIENT_JOIN";
            case MT_LOBBY_CLIENT_LEFT:
                return "MT_LOBBY_CLIENT_LEFT";
            case MT_CREATE_GAME_RESULT:
                return "MT_CREATE_GAME_RESULT";
            case MT_JOIN_GAME_RESULT:
                return "MT_JOIN_GAME_RESULT";
            case MT_GAME_CLIENT_JOIN:
                return "MT_GAME_CLIENT_JOIN";
            case MT_GAME_CLIENT_LEFT:
                return "MT_GAME_CLIENT_LEFT";
            case MT_INVITE:
                return "MT_INVITE";
            case MT_SUB_CHANNEL_INFO:
                return "MT_SUB_CHANNEL_INFO";
            case MT_SET_HOST:
                return "MT_SET_HOST";
            case MT_SET_GAME_STAGE:
                return "MT_SET_GAME_STAGE";
            case MT_BACAY_SET_CARD:
                return "MT_BACAY_SET_CARD";
            case MT_BACAY_GAME_RESULT:
                return "MT_BACAY_GAME_RESULT";
            case MT_BACAY_OPEN_CARD:
                return "MT_BACAY_OPEN_CARD";
            case MT_BACAY_SET_BANKER:
                return "MT_BACAY_SET_BANKER";
            case MT_BACAY_BET_VKIM:
                return "MT_BACAY_BET_VKIM";
            case MT_BACAY_BET_FRONTIER_RESULT:
                return "MT_BACAY_BET_FRONTIER_RESULT";
            case MT_BACAY_BET_CONTRIBUTE_RESULT:
                return "MT_BACAY_BET_CONTRIBUTE_RESULT";
            case MT_USER_DETAIL_INFO:
                return "MT_USER_DETAIL_INFO";
            case MT_BACAY_SELECT_BANKER_CARD:
                return "MT_BACAY_SELECT_BANKER_CARD";
            case MT_VIEWER_DATA:
                return "MT_VIEWER_DATA";
            case MT_NOTIFY_ADD_FRIEND:
                return "MT_NOTIFY_ADD_FRIEND";

            // Client-Side Packet
            case MT_LOGIN:
                return "MT_LOGIN";
            case MT_CREATE_GAME:
                return "MT_CREATE_GAME";
            case MT_QUIT_GAME:
                return "MT_QUIT_GAME";
            case MT_JOIN_GAME:
                return "MT_JOIN_GAME";
            case MT_KICK:
                return "MT_KICK";
            case MT_REQUEST_LOBBY_INFO:
                return "MT_REQUEST_LOBBY_INFO";
            case MT_REQUEST_INVITE:
                return "MT_REQUEST_INVITE";
            case MT_REQUEST_SUB_CHANNEL_INFO:
                return "MT_REQUEST_SUB_CHANNEL_INFO";
            case MT_BACAY_REQUEST_OPEN_CARD:
                return "MT_BACAY_REQUEST_OPEN_CARD";
            case MT_BACAY_REQUEST_BET_VKIM:
                return "MT_BACAY_REQUEST_BET_VKIM";
            case MT_BACAY_REQUEST_BET_FRONTIER:
                return "MT_BACAY_REQUEST_BET_FRONTIER";
            case MT_BACAY_ACCEPT_BET_FRONTIER:
                return "MT_BACAY_ACCEPT_BET_FRONTIER";
            case MT_BACAY_REQUEST_BET_CONTRIBUTE:
                return "MT_BACAY_REQUEST_BET_CONTRIBUTE";
            case MT_BACAY_ACCEPT_BET_CONTRIBUTE:
                return "MT_BACAY_ACCEPT_BET_CONTRIBUTE";
            case MT_REQUEST_USER_DETAIL_INFO:
                return "MT_REQUEST_USER_DETAIL_INFO";
            case MT_REQUEST_REGISTER:
                return "MT_REQUEST_REGISTER";
            case MT_REGISTER_RESULT:
                return "MT_REGISTER_RESULT";
            case MT_REQUEST_USER_BASIC_INFO:
                return "MT_REQUEST_USER_BASIC_INFO";
            case MT_USER_BASIC_INFO:
                return "MT_USER_BASIC_INFO";
            case MT_UPDATE_USER_BASIC_INFO:
                return "MT_UPDATE_USER_BASIC_INFO";
            case MT_REQUEST_BUY_AVATAR:
                return "MT_REQUEST_BUY_AVATAR";
            case MT_BUY_AVATAR_RESULT:
                return "MT_BUY_AVATAR_RESULT";
            case MT_REQUEST_USER_LIST:
                return "MT_REQUEST_USER_LIST";
            case MT_NOTIFY_POPUP:
                return "MT_NOTIFY_POPUP";
            case MT_REQUEST_SEND_MAIL:
                return "MT_REQUEST_SEND_MAIL";
            case MT_SEND_MAIL_RESULT:
                return "MT_SEND_MAIL_RESULT";
            case MT_REQUEST_MAIL_LIST:
                return "MT_REQUEST_MAIL_LIST";
            case MT_LOCK_TABLE:
                return "MT_LOCK_TABLE";
            case MT_REQUEST_MAIL_CONTENT:
                return "MT_REQUEST_MAIL_CONTENT";
            case MT_MAIL_CONTENT:
                return "MT_MAIL_CONTENT";
            case MT_REQUEST_DELETE_MAIL:
                return "MT_REQUEST_DELETE_MAIL";
            case MT_REQUEST_ADD_FRIEND:
                return "MT_REQUEST_ADD_FRIEND";
            case MT_ADD_FRIEND_RESULT:
                return "MT_ADD_FRIEND_RESULT";
            case MT_USER_LIST_END:
                return "MT_USER_LIST_END";
            case MT_LOBBY_INFO:
                return "MT_LOBBY_INFO";
            case MT_USER_LIST:
                return "MT_USER_LIST";
            case MT_MAIL_LIST:
                return "MT_MAIL_LIST";
            case MT_REQUEST_GIFT_DAILY_INFO:
                return "MT_REQUEST_GIFT_DAILY_INFO";
            case MT_GIFT_DAILY_INFO:
                return "MT_GIFT_DAILY_INFO";
            case MT_REQUEST_RECEIVE_GIFT_DAILY:
                return "MT_REQUEST_RECEIVE_GIFT_DAILY";
            case MT_RECEIVE_GIFT_DAILY_RESULT:
                return "MT_RECEIVE_GIFT_DAILY_RESULT";
            case MT_REQUEST_RECEIVE_GIFT_TIME:
                return "MT_REQUEST_RECEIVE_GIFT_TIME";
            case MT_RECEIVE_GIFT_TIME_RESULT:
                return "MT_RECEIVE_GIFT_TIME_RESULT";
            case MT_REQUEST_GIFT_TIME_INFO:
                return "MT_REQUEST_GIFT_TIME_INFO";
            case MT_GIFT_TIME_INFO:
                return "MT_GIFT_TIME_INFO";
            case MT_REQUEST_AUTO_JOIN_GAME:
                return "MT_REQUEST_AUTO_JOIN_GAME";
            case MT_REQUEST_PAYMENT:
                return "MT_REQUEST_PAYMENT";
            case MT_PAYMENT_RESULT:
                return "MT_PAYMENT_RESULT";
            case MT_REQUEST_CHANGE_PASS:
                return "MT_REQUEST_CHANGE_PASS";
            case MT_CHANGE_PASS_RESULT:
                return "MT_CHANGE_PASS_RESULT";
            case MT_PUBLIC_TEXT:
                return "MT_PUBLIC_TEXT";
            case MT_SEND_AVATAR:
                return "MT_SEND_AVATAR";

            // Tala
            case MT_TALA_SET_CARD:
                return "MT_TALA_SET_CARD";
            case MT_TALA_CLIENT_RESULT:
                return "MT_TALA_CLIENT_RESULT";
            case MT_TALA_GAME_RESULT:
                return "MT_TALA_GAME_RESULT";
            case MT_TALA_SET_TURN:
                return "MT_TALA_SET_TURN";
            case MT_TALA_GROUP_CARD:
                return "MT_TALA_GROUP_CARD";
            case MT_TALA_PUT_CARD:
                return "MT_TALA_PUT_CARD";
            case MT_TALA_PICK_CARD:
                return "MT_TALA_PICK_CARD";
            case MT_TALA_EAT_CARD:
                return "MT_TALA_EAT_CARD";
            case MT_TALA_EAT_CHICKEN:
                return "MT_TALA_EAT_CHICKEN";
            case MT_TALA_MOVE_CARD_DOWN:
                return "MT_TALA_MOVE_CARD_DOWN";
            case MT_TALA_DOWN_GROUP:
                return "MT_TALA_DOWN_GROUP";
            case MT_TALA_DOWN_GROUP_END:
                return "MT_TALA_DOWN_GROUP_END";
            case MT_TALA_OPEN_CARD:
                return "MT_TALA_OPEN_CARD";
            case MT_TALA_CONTRIBUTE_CARD:
                return "MT_TALA_CONTRIBUTE_CARD";
            case MT_TALA_REQUEST_PUT_CARD:
                return "MT_TALA_REQUEST_PUT_CARD";
            case MT_TALA_REQUEST_PICK_CARD:
                return "MT_TALA_REQUEST_PICK_CARD";
            case MT_TALA_REQUEST_EAT_CARD:
                return "MT_TALA_REQUEST_EAT_CARD";
            case MT_TALA_REQUEST_DOWN_GROUP:
                return "MT_TALA_REQUEST_DOWN_GROUP";

            // TLMN
            case MT_TLMN_SET_TURN:
                return "MT_TLMN_SET_TURN";
            case MT_TLMN_SET_CARD:
                return "MT_TLMN_SET_CARD";
            case MT_TLMN_REQUEST_PUT_CARD:
                return "MT_TLMN_REQUEST_PUT_CARD";
            case MT_TLMN_PUT_CARD:
                return "MT_TLMN_PUT_CARD";
            case MT_TLMN_REQUEST_LEFT_TURN:
                return "MT_TLMN_REQUEST_LEFT_TURN";
            case MT_TLMN_LEFT_TURN:
                return "MT_TLMN_LEFT_TURN";
            case MT_TLMN_CLIENT_RESULT:
                return "MT_TLMN_CLIENT_RESULT";
            case MT_TLMN_GAME_RESULT:
                return "MT_TLMN_GAME_RESULT";

            // Mau Binh
            case MT_BINH_SET_CARD:
                return "MT_BINH_SET_CARD";
            case MT_BINH_DOWN_CARD:
                return "MT_BINH_DOWN_CARD";
            case MT_BINH_CANCEL_DOWN_CARD:
                return "MT_BINH_CANCEL_DOWN_CARD";
            case MT_BINH_OPEN_CARD:
                return "MT_BINH_OPEN_CARD";
            case MT_BINH_GAME_RESULT:
                return "MT_BINH_GAME_RESULT";
            case MT_REQUEST_REMOVE_LAZY:
                return "MT_REQUEST_REMOVE_LAZY";
            case MT_SET_CHICKEN:
                return "MT_SET_CHICKEN";
            case MT_REQUEST_EXCHANGE_MONEY:
                return "MT_REQUEST_EXCHANGE_MONEY";
            case MT_EXCHANGE_MONEY:
                return "MT_EXCHANGE_MONEY";
            case MT_SELL_ITEM:
                return "MT_SELL_ITEM";
            case MT_MARKET_ITEM_LIST:
                return "MT_MARKET_ITEM_LIST";
            case MT_BUY_ITEM:
                return "MT_BUY_ITEM";
            case MT_USER_INFO:
                return "MT_USER_INFO";
            case MT_BUY_CARD:
                return "MT_BUY_CARD";

            case MT_BAITAY_REQUEST_OPEN_CARD:
                return "MT_BAITAY_REQUEST_OPEN_CARD";
            case MT_BAITAY_SET_CARD:
                return "MT_BAITAY_SET_CARD";
            case MT_BAITAY_OPEN_CARD:
                return "MT_BAITAY_OPEN_CARD";
            case MT_BAITAY_GAME_RESULT:
                return "MT_BAITAY_GAME_RESULT";
            case MT_BAITAY_SET_TURN:
                return "MT_BAITAY_SET_TURN";
            case MT_BAITAY_CALL_BET:
                return "MT_BAITAY_CALL_BET";
            case MT_BAITAY_CLOSE_CARD:
                return "MT_BAITAY_CLOSE_CARD";
            case MT_BAITAY_FOLLOW:
                return "MT_BAITAY_FOLLOW";
            case MT_NOTIFY_ERROR:
                return "MT_NOTIFY_ERROR";
            case MT_SHOP_ITEM_LIST:
                return "MT_SHOP_ITEM_LIST";
            case MT_EMOTION_LIST:
                return "MT_EMOTION_LIST";

            default:
                return "MT_UNKNOWN";
        }
    }

    public static int GetLevel(int Exp)
    {
        int Level = 1;
        for (int i = 1; i < MAX_LEVEL; i++)
        {
            if (Exp >= LEVEL_EXP[i - 1] && Exp < LEVEL_EXP[i])
            {
                Level = i + 1;
                break;
            }
        }

        if (Exp >= LEVEL_EXP[MAX_LEVEL - 1])
        {
            Level = MAX_LEVEL;
        }

        return Level;
    }

    public static void UpdateScore(int AccountId, double d, int i, int APP_CARO, int i0, int i1, int i2, int i3)
    {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
